Rewrite plex recommend as a native button View - #49
Merged
Conversation
Replace the reaction-driven selection (number emojis + a wait_for "reaction_add" loop) with a native nextcord.ui.View, matching the pattern now used by recent/random. The old flow added 1️⃣2️⃣3️⃣ reactions one-by-one with a 1s sleep between each (so the menu was unusable for ~2-3s), polled wait_for in a manual end_time loop, and posted a fresh detail message per pick (deleting the previous). RecommendationView instead shows numbered buttons that drill into each pick in place, with a Back button to return to the list. Each transition defers the component interaction before fetching watchers/poster (so a slow fetch can't blow the 3s ack window), clears the prior poster with attachments=[], restricts the buttons to the command author via interaction_check, and disables them on timeout. Drops the now-unused show_detailed_info, number_emojis, and asyncio import. Updates the recommendation_timeout config description. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the reaction-driven selection (1️⃣2️⃣3️⃣ reactions added one-by-one with a 1s sleep between each, plus a manual
wait_for("reaction_add")loop) with a nativenextcord.ui.View.attachments=[]; restricts buttons to the command author viainteraction_check; disables them on timeout.show_detailed_info,number_emojis, andasyncioimport; updates therecommendation_timeoutconfig description.Verification:
ruffclean, 30/30 tests pass, runtime smoke test of the view (buttons, defer, detail/overview toggle, author gate).🤖 Generated with Claude Code